package easy;

import java.util.ArrayList;
import java.util.List;

public class a1431_拥有最多糖果的孩子 {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
       int max=Integer.MIN_VALUE;
       for (int i=0;i<candies.length;i++){
           if(candies[i]>max){
               max=candies[i];
           }
       }
       List<Boolean> booleans=new ArrayList<>();
       for(int j=0;j<candies.length;j++){
           if(candies[j]+extraCandies>=max){
               booleans.add(true);
           }else {
               booleans.add(false);
           }
       }
       return booleans;
    }
}
